package com.zch.innerclass;

/**
 * 静态内部类
 */
public class StaticInnerClass {
    public static void main(String[] args) {
        Outer04 outer04 = new Outer04();
        outer04.m1();

        Outer04.Inner04 inner04 = new Outer04.Inner04();
        inner04.say();

        Outer04.Inner04 inner042 = outer04.getInner04();
        inner042.say();

        Outer04.Inner04 inner043 = Outer04.getInner04_();
        inner043.say();
    }
}

class Outer04 {
    private int n1 = 10;
    private static String name = "张三";
    private static void cry() {}

    static class Inner04 {
        public void say() {
            System.out.println(name);
            cry();
        }
    }

    public void m1() {
        Inner04 inner04 = new Inner04();
        inner04.say();
    }

    public Inner04 getInner04() {
        return new Inner04();
    }

    public static Inner04 getInner04_() {
        return new Inner04();
    }
}
